/*
切换主题颜色
*/

$haiyanglan: (
  color: #5191ff,
  auxiliary-color: #97bdff
);
$shenhailan: (
  color: #2c5dff,
  auxiliary-color: #809eff
);
$tiankonglan: (
  color: #43c7f9,
  auxiliary-color: #8eddfb
);
$shiliuhong: (
  color: #ec0000,
  auxiliary-color: #f46666
);
$shanchahong: (
  color: #fa648d,
  auxiliary-color: #fca2bb
);
$zhulv: (
  color: #00ad82,
  auxiliary-color: #66ceb4
);
$caolv: (
  color: #19c349,
  auxiliary-color: #75db92
);
$bohelv: (
  color: #00d3b5,
  auxiliary-color: #66e5d3
);
$nanguacheng: (
  color: #ff7c03,
  auxiliary-color: #ffb068
);
$zise: (
  color: #6665ff,
  auxiliary-color: #a3a3ff
);
//定义映射集合
$themes: (
  haiyanglan: $haiyanglan,
  shenhailan: $shenhailan,
  tiankonglan: $tiankonglan,
  shiliuhong: $shiliuhong,
  shanchahong: $shanchahong,
  zhulv: $zhulv,
  caolv: $caolv,
  bohelv: $bohelv,
  nanguacheng: $nanguacheng,
  zise: $zise
);
// 主要颜色
@mixin edu-color-primary($attribute: color, $alpha: 1) {
  @each $themename, $theme in $themes {
    [data-theme='#{$themename}'] & {
      #{$attribute}: rgba($color: map-get($map: $theme, $key: 'color'), $alpha: $alpha) !important;
    }
  }
}
// 辅助颜色
@mixin edu-color-auxiliary($attribute: color) {
  @each $themename, $theme in $themes {
    [data-theme='#{$themename}'] & {
      @if map-has-key($theme, 'auxiliary-color') {
        #{$attribute}: map-get($map: $theme, $key: 'auxiliary-color') !important;
      } @else {
        #{$attribute}: map-get($map: $theme, $key: 'color') !important;
      }
    }
  }
}
